package May;

public class Test04While01 {
    public static void main(String[] args) {
        System.out.println("我将计算出一张足够大的纸折叠多少次可以和猪么朗玛峰一样高");
        double height=8844430;
        double paper=0.1;
        int count=0;
        while (paper<height){
            //折叠
            paper*=2;
            count++;
        }
        //count就是折叠的次数
        System.out.println("一共折叠了"+count+"次");
        String result=using_for();
        System.out.println(result);
    }

    public static String using_for(){
        int number=0;
        for(double i=0.1;i<=8844430;i*=2){
            number++;
        }
        return number+"就是打印的次数";
    }
}
